<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>定时器的测试页面</title>
  <link rel="stylesheet" href="./timer-button.css"/>
</head>
<body>
<!--测试按钮-->
  <input type="button" id="add" value="添加定时器按钮"><hr>
  <div id="main">
    <!--<input type="button" value="同意(6s)" disabled>-->
  </div>
<script src='//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js'></script>
<script src='./timer-button.js'></script>
<script>
  $(function(){
    //页面加载完成后添加
    $timerButton.show({
      num:9,
      title:'发送验证码',
      onClick:function(){//组件事件绑定
        console.log('已发送');
      }
    })
    var $btnAdd = $('#add');
    //按钮被点击时添加
    $btnAdd.click(()=>{
      $timerButton.show({
        num:6,
        title:'发送验证码',
        onClick:function(){//组件事件绑定
          console.log('点击定时器按钮！');
        }
      })

    });
  })
</script>
</body>
</html>
